package com.account.controller.base;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

import com.account.util.BaseResult;


public abstract class BaseController {

  @ResponseBody
  @ExceptionHandler
  public BaseResult<String> exception(HttpServletRequest request, Exception e) {
    BaseResult<String> result = new BaseResult<String>();
    result.setCode(2);
    result.setMessage("服务端执行失败");
    return result;

  }
}